home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Sound / LAME / WarpOS / src / mpglib / mpg123.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-05  |  2.6 KB  |  135 lines

  1. #ifndef MPG123_H_INCLUDED
  2. #define MPG123_H_INCLUDED
  3.  
  4. #include        <stdio.h>
  5.  
  6. #ifdef STDC_HEADERS
  7. # include <string.h>
  8. #else
  9. # ifndef HAVE_STRCHR
  10. #  define strchr index
  11. #  define strrchr rindex
  12. # endif
  13. char *strchr (), *strrchr ();
  14. # ifndef HAVE_MEMCPY
  15. #  define memcpy(d, s, n) bcopy ((s), (d), (n))
  16. #  define memmove(d, s, n) bcopy ((s), (d), (n))
  17. # endif
  18. #endif
  19.  
  20. #include        <signal.h>
  21.  
  22.  
  23. #if defined(__riscos__) && defined(FPA10)
  24. #include    "ymath.h"
  25. #else
  26. #include    <math.h>
  27. #endif
  28.  
  29. #ifndef M_PI
  30. #define M_PI       3.14159265358979323846
  31. #endif
  32. #ifndef M_SQRT2
  33. #define M_SQRT2    1.41421356237309504880
  34. #endif
  35.  
  36. #ifndef FALSE
  37. #define         FALSE                   0
  38. #endif
  39. #ifndef TRUE
  40. #define         TRUE                    1
  41. #endif
  42.  
  43.  
  44. #ifdef REAL_IS_FLOAT
  45. #  define real float
  46. #elif defined(REAL_IS_LONG_DOUBLE)
  47. #  define real long double
  48. #else
  49. #  define real double
  50. #endif
  51.  
  52. #define         FALSE                   0
  53. #define         TRUE                    1
  54.  
  55. #define         SBLIMIT                 32
  56. #define         SSLIMIT                 18
  57.  
  58. #define         MPG_MD_STEREO           0
  59. #define         MPG_MD_JOINT_STEREO     1
  60. #define         MPG_MD_DUAL_CHANNEL     2
  61. #define         MPG_MD_MONO             3
  62.  
  63. #define MAXFRAMESIZE 1792
  64.  
  65. /* AF: ADDED FOR LAYER1/LAYER2 */
  66. #define         SCALE_BLOCK             12
  67.  
  68.  
  69. /* Pre Shift fo 16 to 8 bit converter table */
  70. #define AUSHIFT (3)
  71.  
  72. struct frame {
  73.     int stereo;
  74.     int jsbound;
  75.     int single;
  76.     int lsf;
  77.     int mpeg25;
  78.     int header_change;
  79.     int lay;
  80.     int error_protection;
  81.     int bitrate_index;
  82.     int sampling_frequency;
  83.     int padding;
  84.     int extension;
  85.     int mode;
  86.     int mode_ext;
  87.     int copyright;
  88.     int original;
  89.     int emphasis;
  90.     int framesize; /* computed framesize */
  91.  
  92.     /* AF: ADDED FOR LAYER1/LAYER2 */
  93. #if defined(USE_LAYER_2) || defined(USE_LAYER_1)
  94.     int II_sblimit;
  95.     struct al_table2 *alloc;
  96.     int down_sample_sblimit;
  97.     int    down_sample;
  98.  
  99. #endif
  100.  
  101. };
  102.  
  103. struct gr_info_s {
  104.       int scfsi;
  105.       unsigned part2_3_length;
  106.       unsigned big_values;
  107.       unsigned scalefac_compress;
  108.       unsigned block_type;
  109.       unsigned mixed_block_flag;
  110.       unsigned table_select[3];
  111.       unsigned subblock_gain[3];
  112.       unsigned maxband[3];
  113.       unsigned maxbandl;
  114.       unsigned maxb;
  115.       unsigned region1start;
  116.       unsigned region2start;
  117.       unsigned preflag;
  118.       unsigned scalefac_scale;
  119.       unsigned count1table_select;
  120.       real *full_gain[3];
  121.       real *pow2gain;
  122. };
  123.  
  124. struct III_sideinfo
  125. {
  126.   unsigned main_data_begin;
  127.   unsigned private_bits;
  128.   struct {
  129.     struct gr_info_s gr[2];
  130.   } ch[2];
  131. };
  132.  
  133.  
  134. #endif
  135.